class AddUsers < ActiveRecord::Migration
  def self.up
    User.create(:name => "宋海林",:city=>"上海",:gender=>"女",:email => "songhailin@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/2.jpg")
    sleep 0.01
    User.create(:name => "朱攀",:city=>"北京",:email => "tjzhupan@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/1.jpg")
    sleep 0.01
    User.create(:name => "任志强",:city=>"北京",:email => "renzhiqiang@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/3.jpg")
    sleep 0.01
    User.create(:name => "李刚",:city=>"天津",:email => "ligang@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/4.jpg")
    sleep 0.01
    User.create(:name => "高小松",:city=>"重庆",:email => "gaoxiaosong@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/5.jpg")
    sleep 0.01
    User.create(:name => "潘士其",:city=>"海外",:email => "pan@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/6.jpg")
    sleep 0.01
    User.create(:name => "李开复",:city=>"四川",:email => "kaifuli@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/7.jpg")
    sleep 0.01
    User.create(:name => "王菲",:city=>"台湾",:gender=>"女",:email => "wangfei@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/8.jpg")
    sleep 0.01
    User.create(:name => "王政",:city=>"香港",:email => "wangz@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/9.jpg")
    sleep 0.01
    User.create(:name => "李晓霞",:city=>"澳门",:gender=>"女",:email => "xiaoxiali@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/10.jpg")

    (11..500).each do |id|
      User.create(:name => "#{id}粉丝#{id}",:city=>"海外",:email => "#{id}@gmail.com",:password => "songhailin", :password_confirmation => "songhailin",:image => "/images/avatar/8.jpg")
      sleep 0.01
    end
  end

  def self.down
    User.destroy_all
  end
end
